/*
 * Copyright (c) 2012,东方口岸科技有限公司
 * All rights reserved.
 * 文件名称：ISendMessageCreater.java
 * 摘    要：
 * 版本：1.0
 * 作    者：fengzhiyong
 */
package com.cneport.transfer.router.api;

import java.util.List;
import java.util.Map;

import com.cneport.transfer.ApplicationException;
import com.cneport.transfer.message.dtf.DtfCtrl;
import com.cneport.transfer.message.dxp.DxpCtrl;
import com.cneport.transfer.router.model.SendMessage;

/**
 * @Descption：待发送报文创建器
 * @param <T>
 * @CreateTime:2012-7-12
 */
public interface ISendMessageCreater<T> {

    /**
     * @Name: sendMessageCreator 　* @Descrption:待发送表生成入口，功能：创建XML报文和待发送对象
     * @Author: fengzhiyong
     * @Version: V1.0
     * @CreateDate: 2012-7-12
     * @param: messageList
     * @return: List<SendMessage>
     */
    List<SendMessage> sendMessageCreator(List<T> messageList)
            throws ApplicationException;

    /**
     * @Name: object2XMLMap 　* @Descrption:根据对象列表messageList生成对应的XML映射关系。
     * @Author: fengzhiyong
     * @Version: V1.0
     * @CreateDate: 2012-7-12
     * @param messageList
     * @return Map<String, DxpCtrl>
     */
    public Map<String, DtfCtrl> fromObject2XMLMap(List<T> messageList)
            throws ApplicationException;

    /**
     * @Name: sendMessage2Object 　* @Descrption:根据XML映射关系生成待发送对象(SendMessage)
     * @Author: fengzhiyong
     * @Version: V1.0
     * @CreateDate: 2012-7-12
     * @param messageMaps
     * @return List<SendMessage>
     */
    public List<SendMessage> fromXMLMap2SendMessage(
            Map<String, DtfCtrl> messageMaps) throws ApplicationException;
}
